package org.gd.hellojaxb.simple;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;

/**
 * @author Gorhover
 * @since 2.0.2
 */
@XmlRootElement(name = "list")
@XmlAccessorType(XmlAccessType.NONE)
public class StackTraceXmlList extends ArrayList<StackTraceElement> {

    public StackTraceXmlList(int initialCapacity) {
        super(initialCapacity);
    }

    public StackTraceXmlList() {
    }

    public StackTraceXmlList(Collection<? extends StackTraceElement> c) {
        super(c);
    }

    public StackTraceXmlList(StackTraceElement[] stackTraceElements) {
        this(Arrays.asList(stackTraceElements));
    }

    @XmlElement(name = "row")
    @SuppressWarnings("unused")
    private StackTraceXmlList getThis() {
        return this;
    }
}
